home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CU Amiga Super CD-ROM 19
/
CU Amiga Magazine's Super CD-ROM 19 (1998)(EMAP Images)(GB)[!][issue 1998-02].iso
/
CUCD
/
Readers
/
Gui4Cli
/
Docs
/
Tutorials
/
Sorter.gc
< prev
next >
Wrap
Text File
|
1997-12-02
|
994b
|
56 lines
G4C
; This script builds a short list from scratch, and, if no such
; file already exists, saves a copy of the list in RAM:ShortList.
; You can sort the list, and save a copy of the sorted list as
; Ram:SortedList.
winbig -1 -1 430 100 'Sorter'
wintype 11110001
usetopaz
xonload
guiopen Sorter.gc
lvuse Sorter.gc 1
; Does the list already exist? If so, load it in.
; If not, build it, and save it.
ifexists file RAM:ShortList
lvchange RAM:ShortList
else
lvadd 'Monday'
lvadd 'Tuesday'
lvadd 'Wednesday'
lvadd 'Thursday'
lvadd 'Friday'
lvadd 'Saturday'
lvadd 'Sunday'
lvsave Ram:ShortList
endif
xonclose
guiquit Sorter.gc
Text 80 4 120 10 'Sorting a list' 20 NOBOX
xListView 270 14 130 70 'The list' v '' 0 TXT
gadid 1
xButton 30 40 70 12 'Sort It'
lvuse Sorter.gc 1
LVSort ASC
xButton 110 40 70 12 'Reload'
lvuse Sorter.gc 1
lvclear
lvchange RAM:ShortList
xButton 30 60 190 12 'Save the current list'
lvuse Sorter.gc 1
LVSave 'Ram:SortedList'